<h2>将\n转换为换行，超过3行展示...</h2>
<span [innerHTML]="toHtml(str)"></span>
<hr>
<h2>将\n转换为换行</h2>
<span [innerHTML]="toHtml(str,true)"></span>
<hr>
<h2>在textarea中展示换行【适用于表单默认填充接口返回内容】</h2>
<form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()" class="form">
  <nz-form-item>
    <nz-form-label [nzSm]="3" [nzXs]="24" nzFor="type" [nzNoColon]="true"></nz-form-label>
    <nz-form-control [nzSpan]="17">
      <textarea formControlName="content" class="textarea" nz-input rows="10" placeholder="" [value]="templateContent"></textarea>
    </nz-form-control>
  </nz-form-item>
  <nz-form-item>
    <nz-form-control>
      <button nz-button nzType="primary" [disabled]="!validateForm.valid">进行输出</button>
    </nz-form-control>
  </nz-form-item>
</form>
